Lars Ingebrigtsen [Tue, 22 Mar 2022 22:31:05 +0000 (23:31 +0100)]
Do some NEWS tagging
Lars Ingebrigtsen [Tue, 22 Mar 2022 22:28:00 +0000 (23:28 +0100)]
Document sqlite-mode-open-file and do some NEWS tagging
* doc/lispref/text.texi (Database): Mention sqlite-mode-open-file.
Alexander Adolf [Mon, 14 Mar 2022 20:23:18 +0000 (21:23 +0100)]
Enable Better Alignment of EUDC Inline Expansion With RFC5322
The format of EUDC inline expansion results is formatted according to
the variable eudc-inline-expansion-format, which previously defaulted
to '("%s %s <%s>" firstname name email).
Since email address specifications need to comply with RFC 5322 in
order to be useful in messages, there was little headroom for users to
change this format anyway. Plus, if an EUDC back-end returned an empty
first and last name, the result was the email address in angle
brackets. Whilst this was standard with RFC 822, it is marked as
obsolete syntax by its successor RFC 5322. Also, the first and last
name part was never enclosed in double quotes, potentially producing
invalid address specifications, which may be rejected by a receiving
MTA.
This commit updates the variable eudc-inline-expansion-format, so that
it can, in addition to the current ("format" attributes) list, now
alternatively be set to nil, or a formatting function. In both cases
the resulting email address is formatted using the new function
eudc-rfc5322-make-address, whose results fully comply with RFC 5322.
If the value is nil (the new default value), eudc-rfc5322-make-address
will be called to produce any of the default formats
ADDRESS
FIRST <ADDRESS>
LAST <ADDRESS>
FIRST LAST <ADDRESS>
depending on whether a first and/or last name are returned by the
query, or not.
If the value is a formatting function, that will be called to allow
the user to supply content for the phrase and comment parts of the
address (cf. RFC 5322). Thus one can produce any of the formats:
ADDRESS
PHRASE <ADDRESS>
ADDRESS (COMMENT)
PHRASE <ADDRESS> (COMMENT)
This can for example be used to get "last, first <address>" instead of
the default "first last <address>".
In any case when using nil, or the formatting function, the phrase
part of the result will be enclosed in double quotes if needed, and
the comment part will be omitted if it contains characters not allowed
by RFC 5322.
When eudc-inline-expansion-format remains set to a list as previously,
the old behaviour is fully retained.
Lars Ingebrigtsen [Tue, 22 Mar 2022 20:14:21 +0000 (21:14 +0100)]
Fix two no-X compilation warnings
* lisp/mouse.el (x-hide-tip, x-show-tip): Declare to avoid no-X
build compilation warnings (bug#54524).
* lisp/term/pgtk-win.el (window-system-initialization): Avoid no-X
compilation warning.
Lars Ingebrigtsen [Tue, 22 Mar 2022 20:09:16 +0000 (21:09 +0100)]
Fix a keyboard.c no-X compilation warning
* src/keyboard.c (make_lispy_position): Fix compilation warning in
a --without-x build.
Lars Ingebrigtsen [Tue, 22 Mar 2022 19:13:31 +0000 (20:13 +0100)]
Make mail-header-parse-addresses-lax more lax
* lisp/mail/mail-parse.el (mail-header-parse-addresses-lax): Be
more resilient (bug#54523).
Lars Ingebrigtsen [Tue, 22 Mar 2022 18:18:13 +0000 (19:18 +0100)]
Fix Completion Options typo
* doc/emacs/mini.texi (Completion Options): Fix typo.
Lars Ingebrigtsen [Tue, 22 Mar 2022 18:15:33 +0000 (19:15 +0100)]
Add a shell-filter-ring-bell function
* lisp/shell.el (shell-mode): Mention it.
(shell-filter-ring-bell): New function (bug#21652).
Eli Zaretskii [Tue, 22 Mar 2022 17:56:06 +0000 (19:56 +0200)]
Fix documentation of the new completion-related features
* etc/NEWS:
* lisp/minibuffer.el (completion-auto-help):
* doc/lispref/text.texi (Special Properties):
* doc/emacs/mini.texi (Completion Options): Fix wording of
recently added documentation and customization options.
Jimmy Aguilar Mena [Tue, 22 Mar 2022 17:29:05 +0000 (18:29 +0100)]
Revert "Set cursor-face-highlight-nonselected-window in completions."
This reverts commit
1641b5c04c383b5f53298d70776e3c18577b6f30.
This fixes incorrect highlight in Completions.
Allen Li [Tue, 22 Mar 2022 16:48:13 +0000 (17:48 +0100)]
Add user option for controlling dired-do-shell-command prompt
* doc/emacs/dired.texi (Shell Commands in Dired): Document option
* lisp/dired-aux.el (dired-confirm-shell-command): Add option
(dired-do-shell-command): Check option before prompting
(bug#29465).
Lars Ingebrigtsen [Tue, 22 Mar 2022 15:33:43 +0000 (16:33 +0100)]
Make eshell link faces more distinctive on 8-color displays
* lisp/eshell/em-ls.el (eshell-ls-directory):
(eshell-ls-symlink): Make the faces be distinctive on 8-colour
displays (bug#43615).
dickmao [Tue, 22 Mar 2022 14:59:11 +0000 (15:59 +0100)]
Restore hl-line--buffer tracking
* lisp/hl-line.el (hl-line-overlay, hl-line-overlay-buffer):
Correct replacement variable.
(hl-line--overlay): Clearer doc.
(hl-line--buffer): Nee hl-line-overlay-buffer
(hl-line-sticky-flag): Custom initialization is unfathomable.
(hl-line-mode, hl-line-unhighlight): Orthogonalize sticky.
(hl-line-highlight): Remove highlight from previous buffer.
* test/lisp/hl-line-tests.el (hl-line-sticky, hl-line-tests-verify):
(hl-line-tests-sticky-across-frames, hl-line-tests-sticky):
Test (bug#54481).
Lars Ingebrigtsen [Tue, 22 Mar 2022 14:56:14 +0000 (15:56 +0100)]
Revert "Fix dependency problem in hl-line-sticky-flag"
This reverts commit
46daf70c4a7ce208ab0b3a7893c042fed5f022c2.
This is fixed differently in a subsequent patch.
Lars Ingebrigtsen [Tue, 22 Mar 2022 14:35:05 +0000 (15:35 +0100)]
Fix dependency problem in hl-line-sticky-flag
* lisp/hl-line.el (hl-line-sticky-flag): Open-code
hl-line-unhighlight to avoid recursive dependencies (bug#54481).
Lars Ingebrigtsen [Tue, 22 Mar 2022 14:28:02 +0000 (15:28 +0100)]
Fix color-lighten-hsl logic
* lisp/color.el (color-lighten-hsl): Lighten by percentage,
instead of just adding the specified number to the luminance
element (bug#54514).
Lars Ingebrigtsen [Tue, 22 Mar 2022 14:04:37 +0000 (15:04 +0100)]
Revert todo-mode tests failing after todo-mode reversion
Lars Ingebrigtsen [Tue, 22 Mar 2022 14:02:08 +0000 (15:02 +0100)]
Add new function image-supported-file-p
* lisp/image.el (image-type-from-file-name): Make obsolete.
(image-supported-file-p): New function that has a more sensible
value.
(image-type): Adjust caller.
* lisp/thumbs.el (thumbs-file-size, thumbs-show-image-num): Adjust
callers.
* lisp/mail/rmailmm.el (rmail-mime-set-bulk-data): Adjust caller
and logic.
Lars Ingebrigtsen [Tue, 22 Mar 2022 13:45:19 +0000 (14:45 +0100)]
Revert "Allow using image-convert to view .bmp images"
This reverts commit
ede8ad507d06a336ce8202927f214aecbaf15d6b.
This leads to failures for usages of the function where
Emacs doesn't have support for the formats.
Po Lu [Tue, 22 Mar 2022 11:26:46 +0000 (11:26 +0000)]
Simplify fullscreen management on Haiku
* src/haiku_support.cc (class EmacsWindow, Zoom, UnZoom): Track
zoom state manually instead of guessing what the system
currently thinks it is.
(MakeFullscreen): Always unzoom first.
* src/haiku_support.h (struct haiku_zoom_event): Remove all
fields and add a single field `zoomed'.
* src/haikufns.c (haiku_create_frame, haiku_create_tip_frame):
Remove use of pending_zoom fields.
* src/haikuterm.c (haiku_read_socket): Simplify handling of zoom
events.
(haiku_fullscreen): Simplify handling of different zoom states.
* src/haikuterm.h (struct haiku_output): Remove all pending_zoom
fields since they are no longer required.
Michael Albinus [Tue, 22 Mar 2022 09:29:16 +0000 (10:29 +0100)]
Fix grep-like functions when running on a remote host
* doc/lispref/processes.texi (Shell Arguments):
* etc/NEWS: Describe change in 'shell-quote-argument'. Fix typos.
* lisp/subr.el (shell-quote-argument): New optional argument POSIX.
* lisp/progmodes/grep.el (grep-compute-defaults)
(grep-default-command, grep-expand-keywords, lgrep)
(rgrep-default-command): Use POSIX argument in
`shell-quote-argument'. (Bug#54487)
Andrea Corallo [Tue, 22 Mar 2022 08:32:57 +0000 (09:32 +0100)]
* src/comp.c: Few improvements following
71b8f1fc635.
* src/comp.c (ABI_VERSION): Update.
(Fcomp__register_lambda, Fcomp__register_subr): Remove unnecessary
check.
* src/comp.c (Fcomp__register_lambda, Fcomp__register_subr):
Remove unnecessary change.
Po Lu [Tue, 22 Mar 2022 08:26:11 +0000 (16:26 +0800)]
* src/xterm.c (x_dnd_get_window_proto): Don't return huge protocols.
Juri Linkov [Tue, 22 Mar 2022 08:22:46 +0000 (10:22 +0200)]
Merge branch 'feature/completions-customs'
Po Lu [Tue, 22 Mar 2022 02:46:35 +0000 (02:46 +0000)]
Fix starting Emacs with -mm or -fs on Haiku
* src/haikuterm.c (haiku_set_window_size): Disallow setting the
window size if the frame is fullscreen, like most X window
managers.
Po Lu [Tue, 22 Mar 2022 00:39:55 +0000 (08:39 +0800)]
Fix leak of saved menu event and output data
* src/xterm.c (x_destroy_window, x_free_frame_resources): Free
output data and saved menu event even if display is closed.
Po Lu [Tue, 22 Mar 2022 00:22:41 +0000 (08:22 +0800)]
Fix unloading the hl-line library
* lisp/hl-line.el (hl-line-unload-function): Restore function.
Po Lu [Tue, 22 Mar 2022 00:19:32 +0000 (08:19 +0800)]
Fix incompatible changes in hl-line
* lisp/hl-line.el (hl-line-face): Rename back to hl-line.
(hl-line-face): Restore defcustom.
Juri Linkov [Mon, 21 Mar 2022 19:27:41 +0000 (21:27 +0200)]
Small fixes for new completions features
* lisp/minibuffer.el (completions-header-format):
Rename from completion-header-format.
(completions-highlight, completions-highlight-face):
Move up before first use.
Lars Ingebrigtsen [Mon, 21 Mar 2022 18:28:14 +0000 (19:28 +0100)]
Add new user option `diff-entire-buffers'
* lisp/vc/diff.el (diff-entire-buffers): New user option (bug#54060).
(diff-file-local-copy): Use it.
(diff-buffers): Mention it in the doc string.
Lars Ingebrigtsen [Mon, 21 Mar 2022 18:15:55 +0000 (19:15 +0100)]
Don't break autoload generation of `left-margin' isn't zero
* lisp/emacs-lisp/autoload.el (make-directory-autoloads): Fix
autoload generation breakage is left-margin isn't zero (bug#54491).
Lars Ingebrigtsen [Mon, 21 Mar 2022 17:05:18 +0000 (18:05 +0100)]
Make `n' in image-mode work more reliably with external formats
* lisp/image-mode.el (image-mode): Init the external machinery so
that commands like `n' work for those files.
* lisp/image/image-converter.el (image-converter-initialize):
Factored out into own function.
(image-convert-p): Use it.
(image-convert): Ditto.
Lars Ingebrigtsen [Mon, 21 Mar 2022 16:51:21 +0000 (17:51 +0100)]
Allow specifying the intermediate format
* lisp/image/image-converter.el (image-convert-to-format): New
user format (bug#54494).
(image-convert, image-converter--convert-magick)
(image-converter--convert): Use it.
Lars Ingebrigtsen [Mon, 21 Mar 2022 16:19:03 +0000 (17:19 +0100)]
Allow using image-convert to view .bmp images
* lisp/image.el (image-type-from-file-name): Allow Emacs to fall
back on image-convert to display .bmp images (bug#54492).
Lars Ingebrigtsen [Mon, 21 Mar 2022 15:14:40 +0000 (16:14 +0100)]
Regenerated ldefs-boot.el
dickmao [Sun, 20 Mar 2022 15:34:56 +0000 (11:34 -0400)]
Rewrite hl-line-mode
The fashion of dual global and minor modes, each managing a replica of
state, has long been outmoded by globalized minor modes (nee
easy-mmode-define-global-mode) around the turn of the century.
* lisp/calendar/todo-mode.el (todo-toggle-item-highlighting,
todo-hl-line-range, todo-modes-set-2): Adapt to new
hl-line-highlight-hook.
* lisp/hl-line.el (hl-line-overlay): Rename hl-line--overlay.
(global-hl-line-overlay, global-hl-line-overlays,
global-hl-line-sticky-flag, hl-line-overlay-buffer,
hl-line-range-function): Obsolesce.
(hl-line--overlay): Erstwhile hl-line-overlay.
(hl-line, hl-line-face): Consolidate.
(hl-line-sticky-flag): Say less (Gen Z Hospital).
(hl-line-overlay-priority): Make this a custom.
(hl-line-highlight-hook): Prefer hook over specialized
hl-line-range-function.
(hl-line-mode): Say less (Gen Z Hospital).
(hl-line-make-overlay): Remove
(hl-line-highlight, hl-line-unhighlight): Rewrite.
(hl-line-maybe-unhighlight): Remove.
(hl-line-turn-on): Necessary for globalized minor mode.
(global-hl-line-mode, global-hl-line-highlight,
global-hl-line-highlight-all, global-hl-line-unhighlight,
global-hl-line-maybe-unhighlight, global-hl-line-unhighlight-all):
Prefer globalized minor mode.
(hl-line-move, hl-line-unload-function): Remove.
* test/lisp/calendar/todo-mode-tests.el (todo-test-item-highlighting,
todo-test-done-items-separator06-bol,
todo-test-done-items-separator06-eol,
todo-test-done-items-separator07): Adapt to consolidated face.
Lars Ingebrigtsen [Mon, 21 Mar 2022 15:01:33 +0000 (16:01 +0100)]
Add a new face shr-code
* lisp/net/shr.el (shr-code): New face (bug#54480).
(shr-tag-code): Use it.
Andrea Corallo [Mon, 21 Mar 2022 14:04:49 +0000 (15:04 +0100)]
; * src/comp.c: Update a comment.
Po Lu [Mon, 21 Mar 2022 09:00:38 +0000 (09:00 +0000)]
Minor fixes to Haiku DND support
* src/haiku_support.cc (MessageReceived): If source is remote,
don't test window ID.
(MouseMoved): Don't send mouse motion if dragging.
(be_drag_message): Return true if quit-flag.
* src/haiku_support.h: Update prototypes.
* src/haikuselect.c (haiku_should_quit_drag): New function.
(Fhaiku_drag_message): If rc is true, quit.
Jimmy Aguilar Mena [Mon, 21 Mar 2022 06:55:03 +0000 (07:55 +0100)]
Set cursor-face-highlight-nonselected-window in completions.
* lisp/simple.el (completion-setup-function) : Sets
cursor-face-highlight-nonselected-window to t in Completions.
Stefan Kangas [Mon, 21 Mar 2022 05:30:40 +0000 (06:30 +0100)]
Merge from origin/emacs-28
f15922a57c Update to Org 9.5.2-25-gaf6f12
9fcdd5b63f Improve doc strings of read-char-from-minibuffer-insert-* ...
Po Lu [Mon, 21 Mar 2022 03:48:36 +0000 (11:48 +0800)]
Improve handling of input methods during drag-and-drop
* src/xterm.c (x_dnd_cleanup_drag_and_drop)
(x_dnd_begin_drag_and_drop): Stop removing IC and filter events
before dispatching them.
(x_filter_event): Actually filter events during DND.
(XTread_socket): Verify GenericEvents are actually input
extension events before ignoring them.
Po Lu [Mon, 21 Mar 2022 01:32:54 +0000 (09:32 +0800)]
Make quitting work while DND is waitng for finish
* src/xterm.c (x_dnd_cleanup_drag_and_drop):
(x_dnd_begin_drag_and_drop, handle_one_xevent)
(x_free_frame_resources): Clear waiting for finish flag.
(x_filter_event): Don't filter if waiting for DND finish as
well.
Kyle Meyer [Mon, 21 Mar 2022 01:31:32 +0000 (21:31 -0400)]
Update to Org 9.5.2-25-gaf6f12
Dmitry Gutov [Mon, 21 Mar 2022 01:18:36 +0000 (03:18 +0200)]
Support indentation of Ruby pattern matching expressions
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar, ruby-smie-rules)
(ruby-block-mid-keywords): Treat 'in' token similarly to 'when'.
* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Add indentation example.
Andrew G Cohen [Sun, 20 Mar 2022 05:49:37 +0000 (13:49 +0800)]
Fix imap fetching multiple mailboxes (bug#54158)
* lisp/gnus/mail-source.el (mail-source-fetch-imap): Variables
mailbox-source-string and remove should be reset for each mailbox.
Juri Linkov [Sun, 20 Mar 2022 20:27:17 +0000 (22:27 +0200)]
* etc/NEWS: Mention new hook 'minibuffer-lazy-highlight-setup'.
Augusto Stoffel [Sun, 20 Mar 2022 19:49:32 +0000 (20:49 +0100)]
Add lazy highlight to 'isearch-edit-string'
* lisp/isearch.el (isearch-edit-string): Activate lazy highlight and
lazy count, provided 'isearch-lazy-highlight' respectively
'isearch-lazy-count' are non-nil.
Augusto Stoffel [Sun, 20 Mar 2022 19:46:31 +0000 (20:46 +0100)]
Allow lazy highlight and match count while reading from minibuffer
* lisp/isearch.el (minibuffer-lazy-highlight-setup): New function, can
be added to 'minibuffer-setup-hook' to enable lazy highlight and count
while reading from minibuffer.
(minibuffer-lazy-count-format, minibuffer-lazy-highlight-transform,
minibuffer-lazy-highlight--overlay, minibuffer-lazy-highlight--count,
minibuffer-lazy-highlight--after-change,
minibuffer-lazy-highlight--exit): Auxiliary variables and functions
implementing the lazy highlight functionality while reading from
minibuffer.
Augusto Stoffel [Sun, 20 Mar 2022 19:43:10 +0000 (20:43 +0100)]
New hook, lazy-count-update-hook
* lisp/isearch.el (lazy-count-update-hook): New hook allowing to
display the lazy count in special ways.
(isearch-lazy-highlight-new-loop,
isearch-lazy-highlight-buffer-update): Run `lazy-count-update-hook' at
appropriate times.
* lisp/comint.el (comint-history-isearch-setup,
comint-history-isearch-end): Make sure no lazy count is displayed.
* lisp/simple.el (minibuffer-history-isearch-setup): Make sure no lazy
count is displayed.
Juri Linkov [Sun, 20 Mar 2022 18:59:04 +0000 (20:59 +0200)]
* lisp/tab-bar.el (tab-bar-new-tab-to): Don't funcall const values.
Filter out the values 'clone' and 'window' of 'tab-bar-new-tab-choice'
from function call.
Michael Albinus [Sun, 20 Mar 2022 18:15:53 +0000 (19:15 +0100)]
Extend connection-local variables example in Elisp manual
* doc/lispref/variables.texi (Connection Local Variables):
Explain, how to append variable settings to an existing profile.
Paul Eggert [Sun, 20 Mar 2022 17:46:06 +0000 (10:46 -0700)]
Remove duplicate INLINE_HEADER_BEGIN
* src/thread.h: Remove duplicate INLINE_HEADER_BEGIN.
Problem reportd by Mattias Engdegård.
Eli Zaretskii [Sun, 20 Mar 2022 16:21:44 +0000 (18:21 +0200)]
Improve doc strings of read-char-from-minibuffer-insert-* commands
* lisp/subr.el (read-char-from-minibuffer-insert-char)
(read-char-from-minibuffer-insert-other): Clarify the doc strings.
(Bug#54479)
Po Lu [Sun, 20 Mar 2022 13:19:31 +0000 (21:19 +0800)]
Fix confusion of wanted action with actual action on X
* src/xterm.c (x_dnd_begin_drag_and_drop)
(x_dnd_update_state, handle_one_xevent): Differentiate between
wanted action and chosen action correctly.
Manuel Giraud [Sun, 20 Mar 2022 10:08:31 +0000 (11:08 +0100)]
Fix wrong password stored in Tramp
* lisp/net/tramp.el (tramp-process-actions):
Unset `tramp-password-save-function'.
Po Lu [Sun, 20 Mar 2022 08:21:45 +0000 (16:21 +0800)]
Make DND between frames work properly
* src/xterm.c (handle_one_xevent): Don't wait for a finish event
when dropping on top of another Emacs frame.
Po Lu [Sun, 20 Mar 2022 07:00:36 +0000 (15:00 +0800)]
Improve compliance with version 5 of the XDND specification
* src/xterm.c (x_dnd_cleanup_drag_and_drop): New function.
(x_dnd_begin_drag_and_drop): Handle selection request events
immediately.
(handle_one_xevent): Wait for XdndFinished events and return the
action chosen there.
Po Lu [Sun, 20 Mar 2022 05:53:30 +0000 (05:53 +0000)]
Fix some crashes in shut_down_emacs on Haiku
* src/emacs.c (shut_down_emacs): Stop quitting be app, since
it's not always there.
Po Lu [Sun, 20 Mar 2022 05:51:19 +0000 (05:51 +0000)]
Implement `haiku_delete_terminal'
* src/haikuterm.c (haiku_delete_terminal): Actually delete the
terminal instead of aborting.
Po Lu [Sun, 20 Mar 2022 04:51:46 +0000 (12:51 +0800)]
Check list tail properly in x-begin-drag
* src/xfns.c (Fx_begin_drag): Check that TARGETS is actually a
proper list.
* src/xterm.c (x_dnd_update_state): Remove debugging code.
Po Lu [Sun, 20 Mar 2022 03:23:11 +0000 (11:23 +0800)]
Fix crash on some compositing managers
* src/xterm.c (x_dnd_get_target_window): Catch errors around
CompositeReleaseOverlayWindow.
Po Lu [Sun, 20 Mar 2022 01:53:52 +0000 (09:53 +0800)]
Improve behaviour of drag-n-drop during window manager operations
* src/xterm.c (x_dnd_begin_drag_and_drop): Select for some
events on the root window.
(x_dnd_update_state): New function.
(handle_one_xevent): Call that function when we get some events
from the root window substructure or the window manager.
(x_term_init): New atom `_NET_CLIENT_LIST_STACKING'.
* src/xterm.h (struct x_display_info): New atom
`_NET_CLIENT_LIST_STACKING'.
Eli Zaretskii [Sat, 19 Mar 2022 20:18:47 +0000 (22:18 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Paul Eggert [Sat, 19 Mar 2022 19:35:04 +0000 (12:35 -0700)]
Port to gcc -D EMACS_EXTERN_INLINE
* src/comp.h, src/thread.h: Add INLINE_HEADER_BEGIN and
INLINE_HEADER_END, since it uses INLINE.
* src/emacs.c: Include these two files.
Paul Eggert [Sat, 19 Mar 2022 19:35:04 +0000 (12:35 -0700)]
valid_sp inline fix
* src/bytecode.c (valid_sp): static, not INLINE, as INLINE
should be used only in headers and between INLINE_HEADER_BEGIN
and INLINE_HEADER_END. No need for ‘inline’ here.
Paul Eggert [Sat, 19 Mar 2022 19:35:04 +0000 (12:35 -0700)]
Simplify alloc.c static function decls
* src/alloc.c: Omit unnecessary static function declarations.
Don’t use ‘inline static’ as the C standard says that keyword
order is obsolescent. Anyway, no need for ‘inline’ as compilers
inline without it well enough.
Paul Eggert [Sat, 19 Mar 2022 19:35:04 +0000 (12:35 -0700)]
Make native helper functions static
These don’t need to be extern, even with -flto, since
their addresses are taken.
* src/comp.c (helper_unwind_protect, helper_unbind_n)
(helper_save_restriction, helper_GET_SYMBOL_WITH_POSITION)
(helper_PSEUDOVECTOR_TYPEP_XUNTAG): Now static.
Paul Eggert [Sat, 19 Mar 2022 19:35:04 +0000 (12:35 -0700)]
Remove unused fns/data and make fns static
* src/comp.c (saved_sigset, helper_temp_output_buffer_setup):
Remove; unused.
* src/comp.c (logfile, helper_link_table):
* src/fns.c (hashfn_equal, hashfn_eql):
* src/frame.c (frame_windows_min_size):
* src/gnutls.c (emacs_gnutls_global_init):
* src/minibuf.c (Vcommand_loop_level_list):
* src/syntax.c (syntax_code_spec):
* src/timefns.c (time_overflow):
* src/xterm.c (x_xrender_color_from_gc_foreground)
(x_display_set_last_user_time):
Now static, since it’s not used elsewhere.
* src/xterm.c (x_xrender_color_from_gc_foreground)
(x_xrender_color_from_gc_background): Move earlier to avoid
forward use.
(x_xrender_color_from_gc_foreground): Do not define unless
!defined USE_CAIRO && (RENDER_MAJOR > 0 || RENDER_MINOR >= 2),
since it’s not used otherwise.
Paul Eggert [Sat, 19 Mar 2022 19:35:04 +0000 (12:35 -0700)]
Use filenvercmp instead of doing it by hand
* src/fns.c (Fstring_version_lessp): Use filenvercmp,
not string_version_cmp.
(string_version_cmp): Remove; no longer used.
Paul Eggert [Sat, 19 Mar 2022 19:35:04 +0000 (12:35 -0700)]
Omit unnecessary code when !HAVE_NATIVE_COMP
* src/decompress.c (MD5_BLOCKSIZE, acc_buf, acc_size)
(accumulate_and_process_md5, final_process_md5, md5_gz_stream):
* src/dynlib.c (dynlib_open_for_eln, dynlib_close) [!WINDOWSNT]:
* src/fileio.c (internal_delete_file_1, internal_delete_file):
Define only if HAVE_NATIVE_COMP && WINDOWSNT,
as they’re not used otherwise.
Paul Eggert [Sat, 19 Mar 2022 19:35:04 +0000 (12:35 -0700)]
Remove internal_condition_case_[345]
* src/comp.c (directory_files_matching) [WINDOWSNT]: New function.
(eln_load_path_final_clean_up) [WINDOWSNT]: Use it.
This removes the need for internal_condition_case_5.
* src/eval.c (internal_condition_case_3)
(internal_condition_case_4, internal_condition_case_5): Remove.
The first two were never used; the last only in now-removed code.
Paul Eggert [Sat, 19 Mar 2022 19:35:03 +0000 (12:35 -0700)]
Remove sanitize_window_sizes
* src/window.c (sanitize_window_sizes): Remove; no-longer-used.
A previous refactoring moved this to Lisp without removing the C code.
Eli Zaretskii [Sat, 19 Mar 2022 15:19:19 +0000 (17:19 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Lars Ingebrigtsen [Sat, 19 Mar 2022 14:11:15 +0000 (15:11 +0100)]
Make `command-modes' work for (native-compiled) subrs, too
* lisp/emacs-lisp/comp.el (comp-func): Add a command-modes slot.
(comp-spill-lap-function, comp-intern-func-in-ctxt): Fill it.
(comp-emit-for-top-level, comp-emit-lambda-for-top-level): Use it.
* src/alloc.c (mark_object): Mark the command_modes slot.
* src/comp.c (make_subr): Add a command_modes parameter.
(Fcomp__register_lambda): Use it.
(Fcomp__register_subr): Ditto.
* src/data.c (Fcommand_modes): Output the command_modes data for subrs
(bug#54437).
* src/lisp.h (GCALIGNED_STRUCT): Add a command_modes slot.
* src/pdumper.c (dump_subr): Update hash.
(dump_subr): Dump the command_modes slot.
Po Lu [Sat, 19 Mar 2022 10:46:50 +0000 (18:46 +0800)]
Improve protection against faulty clients during DND
* src/xterm.c (x_dnd_send_enter, x_dnd_send_position)
(xdnd_send_leave, x_dnd_send_drop): Catch errors around call to
XSendEvent. The target window could be gone.
F. Jason Park [Sat, 19 Mar 2022 09:33:24 +0000 (02:33 -0700)]
; * test/lisp/erc/erc-tests.el (erc--switch-to-buffer): Fix test failure.
Guy Gastineau [Sat, 29 Jan 2022 04:12:42 +0000 (23:12 -0500)]
Remove redundant checks in erc--switch-to-buffer
* lisp/erc/erc.el (erc--switch-to-buffer): Commit
f925fc93bac41d7622d1af927e33b0e738ff55b0 "Add `predicate' arg to
`read-buffer' and use it for erc-iswitchb" meant to remove this, but
it was left behind. (Bug#53617)
Copyright-paperwork-exempt: yes
F. Jason Park [Mon, 14 Mar 2022 05:39:36 +0000 (22:39 -0700)]
Add unit test for erc--switch-to-buffer
* test/lisp/erc/erc-tests.el (erc--switch-to-buffer): Add new test.
(Bug#53617)
Eli Zaretskii [Sat, 19 Mar 2022 07:25:18 +0000 (09:25 +0200)]
Merge from origin/emacs-28
e059d7c Fix region highlight in non-selected windows
Eli Zaretskii [Sat, 19 Mar 2022 07:19:53 +0000 (09:19 +0200)]
Fix region highlight in non-selected windows
* src/xdisp.c (prepare_menu_bars): Include in the windows passed
to pre-redisplay-functions windows whose point was moved from the
last recorded position. (Bug#54450)
Po Lu [Sat, 19 Mar 2022 07:00:11 +0000 (07:00 +0000)]
Ignore drag source frame on Haiku in line with documentation
* src/haiku_support.cc (class EmacsWindow): New field
`window_id'.
(MessageReceived): Ignore dropped messages with same window id.
(be_drag_message): Add source frame's window ID to message.
Stefan Kangas [Sat, 19 Mar 2022 05:30:38 +0000 (06:30 +0100)]
Merge from origin/emacs-28
c4596c8522 Fix a regression in 'decipher-digram-list'
Po Lu [Sat, 19 Mar 2022 03:35:55 +0000 (11:35 +0800)]
Document dired-mouse-drag-files
* doc/emacs/dired.texi (Misc Dired Features): Explain that
dragging files is now supported.
* etc/NEWS: Update documentation status.
* lisp/dired.el (dired-mouse-drag-files): Fix typo in doc
string.
Po Lu [Sat, 19 Mar 2022 02:52:27 +0000 (10:52 +0800)]
* src/xterm.c (XTread_socket): Don't filter GenericEvents.
Po Lu [Sat, 19 Mar 2022 02:27:19 +0000 (10:27 +0800)]
Fix some glitches when dragging files from dired
* lisp/dired.el (dired-mouse-drag-files): Fix initial values.
(dired-mouse-drag): Clear mark if active and only make button
release events unread.
Po Lu [Sat, 19 Mar 2022 01:11:09 +0000 (09:11 +0800)]
Handle composite overlay window during drag and drop sessions
* configure.ac: Test for the composite extension and use it if
available.
* msdos/sed1v2.inp: Update.
* src/Makefile.in (XCOMPOSITE_LIBS, XCOMPOSITE_CFLAGS): New
variables.
(EMACS_CFLAGS, LIBES): Add new libs and cflags.
* src/xterm.c (x_dnd_get_target_window): Look for proxy on
composite overlay window if mapped.
(x_term_init): Test if the composite extension is available.
* src/xterm.h (struct x_display_info): New fields for composite
extension presence.
Po Lu [Fri, 18 Mar 2022 23:45:14 +0000 (07:45 +0800)]
Fix some XIM servers getting confused during drag-and-drop
* src/xterm.c (x_dnd_begin_drag_and_drop): Clear XIC while event
loop is in progress.
(x_filter_event): Return 0 if DND is in progress.
(xim_instantiate_callback): Likewise.
Jimmy Aguilar Mena [Thu, 17 Mar 2022 22:28:07 +0000 (23:28 +0100)]
cursor-face-highlight-nonselected-window default to nil
* lisp/simple.el (redisplay--update-cursor-face-highlight) : Use if-let*
and not check facep.
(cursor-face-highlight-nonselected-window) : default to nil
Stefan Monnier [Fri, 18 Mar 2022 20:07:42 +0000 (16:07 -0400)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Minor optimization
Stefan Monnier [Fri, 18 Mar 2022 15:59:32 +0000 (11:59 -0400)]
Pcomplete: Better obey `completion-at-point-functions`
Functions on `completion-at-point-functions` should not modify
the buffer. Pcomplete itself mostly abides by this but Eshell's
use of it doesn't. Try and catch those cases. Also fix one of
those cases.
* lisp/pcomplete.el (pcomplete-allow-modifications): New var.
(pcomplete-completions-at-point): Enforce it.
(pcomplete, pcomplete-expand-and-complete, pcomplete-expand):
Rebind it since these commands expect the extra side effects.
* lisp/eshell/em-cmpl.el (eshell--pcomplete-insert-tab): New function,
extracted from `eshell-complete-parse-arguments`.
(eshell-complete-parse-arguments): Use it and obey
`pcomplete-allow-modifications`.
Stefan Monnier [Fri, 18 Mar 2022 15:51:46 +0000 (11:51 -0400)]
* lisp/gnus/mail-source.el (mail-source-set-1): Fix indent and simplify
Mattias Engdegård [Fri, 18 Mar 2022 12:58:36 +0000 (13:58 +0100)]
Speed up fixnum printing
Use the new number-to-string code to speed up fixnum printing, with
similar results (often more than twice as fast as before).
* src/data.c (Fnumber_to_string): Move fixnum conversion to...
(fixnum_to_string): ... this new function.
* src/lisp.h: (fixnum_to_string): External declaration.
* src/print.c (print_object): Use fixnum_to_string instead of sprintf.
Eli Zaretskii [Fri, 18 Mar 2022 11:54:46 +0000 (13:54 +0200)]
Fix a regression in 'decipher-digram-list'
* lisp/play/decipher.el (decipher-stats-buffer): Don't assume the
statistics buffer always exists. (Bug#54443)
Michael Albinus [Fri, 18 Mar 2022 11:25:32 +0000 (12:25 +0100)]
Make application configurable in 'with-connection-local-variables'
* doc/lispref/variables.texi (Connection Local Variables):
Explain 'connection-local-default-application'.
* etc/NEWS: Mention 'connection-local-default-application'.
* lisp/files-x.el (connection-local-default-application): New variable.
(connection-local-criteria-for-default-directory): Use it. (Bug#54405)
* test/lisp/files-x-tests.el
(files-x-test-with-connection-local-variables): Extend test.
Mattias Engdegård [Fri, 18 Mar 2022 10:43:10 +0000 (11:43 +0100)]
Speed up number-to-string for fixnums
Do the binary-to-decimal conversion by hand for fixnums instead of
calling sprintf. This results in a noticeable speed increase (on my
machine, 2.2× faster excluding GC).
* src/data.c (Fnumber_to_string): Don't use sprintf for fixnums.
Po Lu [Fri, 18 Mar 2022 09:21:39 +0000 (09:21 +0000)]
Implement drag-and-drop of files on Haiku
* lisp/term/haiku-win.el (haiku-dnd-selection-converters): Add
new selection converter.
(haiku-dnd-convert-uri-list): New function.
(x-begin-drag): Allow selection converters to change message
field type.
* src/haikuselect.c (haiku_lisp_to_message): Perform more error
checking.
Stefan Kangas [Fri, 18 Mar 2022 06:01:18 +0000 (07:01 +0100)]
Merge from origin/emacs-28
530c3491e8 Improve documentation of bookmark default sorting
11492259b1 ; * doc/lispref/display.texi (Overlay Arrow): More accurat...
Po Lu [Fri, 18 Mar 2022 05:48:10 +0000 (05:48 +0000)]
Allow dragging messages with file names on Haiku
* src/haiku_select.cc (be_add_refs_data): New function.
* src/haikuselect.c (haiku_lisp_to_message): Handle `ref' type
correctly.
* src/haikuselect.h: Update prototypes.
Po Lu [Fri, 18 Mar 2022 05:17:19 +0000 (13:17 +0800)]
Allow dragging files from Dired to other programs
* etc/NEWS: Announce new user option `dired-mouse-drag-files'.
* lisp/dired.el (dired-mouse-drag-files): New user option.
(dired-mouse-drag): New command.
(dired-mouse-drag-files-map): New variable.
(dired-insert-set-properties): Add additional keymap if mouse
dragging is enabled.
* lisp/select.el (xselect-convert-to-targets): Handle new
form of selection converters.
(xselect-convert-to-username):
(xselect-convert-to-text-uri-list):
(xselect-uri-list-available-p): New functions.
(selection-converter-alist): Add them as selection converters.
* src/xselect.c (x_get_local_selection): Handle new form of
selection converters.
(syms_of_xselect): Update doc strings.